import http from "@/utils/http";

export const getPageTradeSaleApi = (queryPageParams) => {
  return http({
    url: "trade/tradeSale/getPage",
    method:"GET",
    params:{
      pageNum: queryPageParams.pageNum,
      pageSize: queryPageParams.pageSize,
      goodsName: queryPageParams.goodsName,
      start:queryPageParams.dateTime[0],
      end:queryPageParams.dateTime[1]
    }
  }
  )
};

export const uploadTradeSaleApi = () => {
  return http({
    url: "trade/tradeSale/upload",
    method:"POST"
  }
  )
};

export const getPageTradeStockApi = (queryPageParams) => {
  return http({
    url: "trade/tradeStock/getPage",
    method:"GET",
    params:{
      pageNum: queryPageParams.pageNum,
      pageSize: queryPageParams.pageSize,
      goodsName: queryPageParams.goodsName,
      start:queryPageParams.dateTime[0],
      end:queryPageParams.dateTime[1]
    }
  }
  )
};

export const uploadTradeStockApi = () => {
  return http({
    url: "trade/tradeStock/upload",
    method:"POST"
  }
  )
};
